package menu;

import base.Main;
import objects.GruObject;

public class AddToSlotMenuItem extends MenuItem {
	public GruObject objectClass;
	public ObjectListMenuItem item;
	
	public AddToSlotMenuItem( String caption, GruObject objectClass, ObjectListMenuItem item ) {
		super( caption );
		this.objectClass = objectClass;
		this.item = item;
	}
	
	@Override
	public void select() {
		item.selectItem( object.toGruObject() );
		Main.refresh();
	}
}